import {UserModel} from "../../../models/user.js";
var _UserModel = new UserModel();
var _self;
Page({
  data: {
    pointsList:[],
    sumPoints:""
  },
  onLoad: function (options) {

    _self = this;
    if (options.sumPoints){
      _self.setData({
        sumPoints:options.sumPoints
      })
    }
    _UserModel.getPoints(function(data){
        if(data.length>0){
          _self.setData({
            pointsList:data[0].list
          })
          console.log(data[0].list)
        }
    })
  },
  onReady: function () {

  },
  onShow: function () {

  }
})